class GoodsData {
  GoodsInfo? message;
  Meta? meta;

  GoodsData({this.message, this.meta});

  GoodsData.fromJson(Map<String, dynamic> json) {
    message =
        json['message'] != null ? GoodsInfo.fromJson(json['message']) : null;
    meta = json['meta'] != null ? Meta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (message != null) {
      data['message'] = message!.toJson();
    }
    if (meta != null) {
      data['meta'] = meta!.toJson();
    }
    return data;
  }
}

class GoodsInfo {
  int? total;
  int? pagenum;
  List<Goods>? goods;

  GoodsInfo({this.total, this.pagenum, this.goods});

  GoodsInfo.fromJson(Map<String, dynamic> json) {
    total = json['total'];
    pagenum = json['pagenum'];
    if (json['goods'] != null) {
      goods = <Goods>[];
      json['goods'].forEach((v) {
        goods!.add(Goods.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['total'] = total;
    data['pagenum'] = pagenum;
    if (goods != null) {
      data['goods'] = goods!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Goods {
  int? goodsId;
  int? catId;
  String? goodsName;
  int? goodsPrice;
  int? goodsNumber;
  int? goodsWeight;
  String? goodsBigLogo;
  String? goodsSmallLogo;
  int? addTime;
  int? updTime;
  int? hotMumber;
  bool? isPromote;
  int? catOneId;
  int? catTwoId;
  int? catThreeId;

  Goods(
      {this.goodsId,
      this.catId,
      this.goodsName,
      this.goodsPrice,
      this.goodsNumber,
      this.goodsWeight,
      this.goodsBigLogo,
      this.goodsSmallLogo,
      this.addTime,
      this.updTime,
      this.hotMumber,
      this.isPromote,
      this.catOneId,
      this.catTwoId,
      this.catThreeId});

  Goods.fromJson(Map<String, dynamic> json) {
    goodsId = json['goods_id'];
    catId = json['cat_id'];
    goodsName = json['goods_name'];
    goodsPrice = json['goods_price'];
    goodsNumber = json['goods_number'];
    goodsWeight = json['goods_weight'];
    goodsBigLogo = json['goods_big_logo'];
    goodsSmallLogo = json['goods_small_logo'];
    addTime = json['add_time'];
    updTime = json['upd_time'];
    hotMumber = json['hot_mumber'];
    isPromote = json['is_promote'];
    catOneId = json['cat_one_id'];
    catTwoId = json['cat_two_id'];
    catThreeId = json['cat_three_id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['goods_id'] = goodsId;
    data['cat_id'] = catId;
    data['goods_name'] = goodsName;
    data['goods_price'] = goodsPrice;
    data['goods_number'] = goodsNumber;
    data['goods_weight'] = goodsWeight;
    data['goods_big_logo'] = goodsBigLogo;
    data['goods_small_logo'] = goodsSmallLogo;
    data['add_time'] = addTime;
    data['upd_time'] = updTime;
    data['hot_mumber'] = hotMumber;
    data['is_promote'] = isPromote;
    data['cat_one_id'] = catOneId;
    data['cat_two_id'] = catTwoId;
    data['cat_three_id'] = catThreeId;
    return data;
  }
}

class Meta {
  String? msg;
  int? status;

  Meta({this.msg, this.status});

  Meta.fromJson(Map<String, dynamic> json) {
    msg = json['msg'];
    status = json['status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['msg'] = msg;
    data['status'] = status;
    return data;
  }
}
